package org.jeecg.modules.app.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.app.entity.FoodCategory;
import org.jeecg.modules.app.service.FoodService;
import org.jeecg.modules.app.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 李圳川
 * @version 1.0
 * @date 2022/6/12 15:51
 * @content
 */

@RestController
@RequestMapping("/schoolOrder/app/food")
@Api(tags="app菜品")
@Slf4j
public class FoodController {

    @Autowired
    private FoodService foodService;

    /**
     * 菜品查询
     * @param createBy
     * @return
     */
    @ApiOperation("app顾客菜品查询")
    @GetMapping("/findAllFoodByCreateBy")
    public Result<?> findAllFoodByCreateBy(String createBy){
        List<FoodCategory> foodCategoryList = foodService.findAllFoodByCreateBy(createBy);
        return Result.success("200","查询成功",foodCategoryList);
    }

}
